package com.eqxiu.ieditor.commons.constants;

public enum PlatformEnum {
    PC(1),IOS(2),ANDROID(3),FULL(4),MOBILE(5),EDITOR(6);
    
    private int code;
    
    private PlatformEnum(int code){
        this.code = code;
    }
    
    public int getCode() {
        return code;
    }

    /**
     * @auth:江赛
     * @desc:把远端的平台code转为商城平台code
     * @date: 2016年12月9日
     * @param remoteCode 远端code
     * @return 商城code
     */
    public static Integer translateToMallPlatCode(Integer remoteCode){
        Integer mallCode = 0;
        if(remoteCode == null){
            mallCode = null;
        }else if(remoteCode == 1){
            mallCode = 1;
        }else if(remoteCode == 3){
            mallCode = 5;
        }
        return mallCode;
    }
    
}
